
from .base import Resource, Client, ResourceManager


class Project(Resource):

    _url_path = 'project'


class Host(Resource):

    _url_path = 'host'


class Domain(Resource):

    _url_path = 'domain'


class CmdbClient(Client):

    def setup(self):
        self.managers['Project'] = ResourceManager(
            Project, self.api, self.debug
        )
        self.managers['Host'] = ResourceManager(
            Host, self.api, self.debug
        )
        self.managers['Domain'] = ResourceManager(
            Domain, self.api, self.debug
        )

    @property
    def host(self):
        return self.managers['Host']

    @property
    def domain(self):
        return self.managers['Domain']

    @property
    def project(self):
        return self.managers['Project']
